#include<stdio.h>
int main()
{
	int x,y;
	printf("x:\n");
	scanf("%d",&x);
	if(x>=0&&x<=8){
		y=x+2*x*x+10;
	}else{
		y=x-3*x*x*x-9;
	}
	printf("x=%d,y=%d\n",x,y);
	return 0;
}